.v-modal {
  opacity: 0.2;
}

.el-dialog__wrapper {
  .el-dialog.element-dialog .el-dialog__header {
    background-color: var(--color-primary);
  }
}

.el-dialog {
  border-radius: 4px 4px 0 0;

  .el-dialog__header {
    @include flex-not-shrink;
  }

  .el-dialog__header,
  &.element-dialog .el-dialog__header {
    color: #fff;
    background-color: var(--color-primary);
    border-radius: 4px 4px 0 0;

    .el-dialog__title {
      color: #fff;
      font-weight: bold;
    }

    .el-dialog__headerbtn {
      color: var(--color-primary);

      .el-dialog__close {
        padding: 4px;
        color: #fff;
        border-radius: 4px;

        &:hover {
          color: #fff;
          background: #e34e55;
          opacity: 1;
        }
      }
    }
  }

  .el-dialog__header {
    padding: 14px 20px;

    .el-dialog__headerbtn {
      top: 14px;
    }
  }

  .el-dialog__body {
    padding: 10px;
    overflow: auto;
    text-align: left;
  }

  // 隐藏头部
  &.el-dialog-none-header {
    .el-dialog__header {
      display: none;
    }
  }

  // 全屏
  &.is-fullscreen {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  // 可调整窗口
  &.el-dialog-resizeable {
    display: flex;
    flex-direction: column;

    .el-dialog__body {
      position: relative;
      flex: 1 1 auto;
      padding: 0;
    }

    .el-dialog__header {
      position: relative;
      font-size: 18px;
    }

    .el-dialog__footer {
      padding-bottom: 10px;
      text-align: right;
    }

    .fullscreen-btn {
      position: absolute;
      top: 14px;
      right: 50px;
      padding: 2px;
      color: #fff;
      background: 0 0;
      border: none;
      outline: 0;
      cursor: pointer;

      &:hover {
        background: #e34e55;
      }

      .el-icon-full-screen,
      .el-icon-copy-document {
        padding: 4px;
        font-size: 13px;
      }
    }

    .dialog-head-group {
      position: absolute;
      top: 50%;
      right: 14px;
      transform: translateY(-50%);
    }
  }

  /* 有边框风格 */
  &.el-dialog-border {
    padding-bottom: 2px;
    background-color: #fdfcfc;
    border-radius: 4px;
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.4);

    .el-dialog__header {
      padding: 14px 20px;
    }

    .el-dialog__body {
      margin: 0 4px 4px;
      padding: 0;
      background-color: #fff;

      // border: 1px solid #dde0e7;
      border-radius: 4px;
    }

    .el-dialog__headerbtn {
      top: unset;
      right: 12px;
    }
  }

  &.normalize {
    .el-dialog__footer {
      padding: 10px;
      text-align: right;
      border-top: 1px solid #dddee3;
    }

    .el-dialog__body {
      padding: 0;
    }
  }

  &.footer-align-right {
    .el-dialog__footer {
      text-align: right;
    }
  }

  &.footer-align-center {
    .el-dialog__footer {
      text-align: center;
    }
  }

  &.footer-align-left {
    .el-dialog__footer {
      text-align: left;
    }
  }

  &.normal-footer-padding {
    .el-dialog__footer {
      padding: 10px;
    }
  }
}
